Pi 6LoWPAN SLIP radio

$9 USD

out of stock

This is another way of making a border router out of a pi. Where the AT86RF233 module exposes the transceiver to the pi and has linux running the network stack, this module has a microcontroller (NXP KW41Z) to run the network stack and talks IPv6 to the pi over the UART via a SLIP link. The SWD pins are also routed to the pi for programming and debugging.

I'm running Riot on this mostly. The gnrc-border-router example is a good starting point. It sets up a SLIP interface to the pi and serves a /64 on the wireless interface and routes between them. You can also run the OpenThread firmware for frdm-kw41z without modification but I haven't done much with that.

The main relevant difference between attaching an SPI transceiver directly to linux on the pi versus adding a microcontroller that runs the network stack is that the network stacks in linux and embedded OSs like Riot are still in different states of maturity and that means that some things are only available on one platform or the other, and that the interoperability between platforms is incomplete. So if for instance you're running Riot on your end devices you may want the border router to run Riot too in some cases. Anyway that's the need I had when I made this. Also of course it's useful to have both options for development purposes.

19 Comments

Menachem

May 17, 2021, 8:59 a.m.

Hi
on May 3rd i bought 5 Pi 6LoWPAN SLIP radio (PayPal # 9G5542042D754421E)
can you please send me the package tracking number?
thanks

Moustafa Nasralla

Oct. 17, 2022, 2:10 p.m.

Dear Menachem,

Did you get your package? I have made an order and no one seems to reply.

Best wishes
Moustafa

Tin Foil Gal

July 25, 2019, 1:43 a.m.

Is there a way to purchase this without PayPal?
I'm too tinfoil hat for PayPal and it's liberal Data Sharing network.

benemorius

July 27, 2019, 9 p.m.

No and I don't disagree with you and I'm really very sorry I still haven't resolved that yet. I had almost finished implementing stripe but I've been really busy doing a lot of other stuff and I don't know when I'll actually finish it.

Tin Foil Gal

July 29, 2019, 11:30 p.m.

Thank you for the effort though.

Faith

July 22, 2019, 12:34 p.m.

I bought this item but I couldn't work it on Raspberry PI 3B+
Any one could work?

benemorius

July 27, 2019, 8:48 p.m.

Can you elaborate on the problem you encountered? It should work on 3b+ but I haven't been able to test it personally yet.

Mesut

July 11, 2019, 11:46 a.m.

hi,i have this 802.15.4 network that operates on channel 26 with panid 0xbeef.2 of my raspberrys can ping each other using Raspberry Pi 802.15.4 radio modules.what i want to do is to use 6LoWPAN SLIP radio module as an interface like your tap0: solution and ping both devices. Is this possible and if so what are steps needed to be done

Mesut

July 11, 2019, 2:04 p.m.

I am receiving this error with the method that you write for Murat

write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success

benemorius

July 11, 2019, 4:16 p.m.

What command gave that output? I haven't seen it before.

Murat

July 11, 2019, 4:57 p.m.

RIOT / dist / tools / ethos / start_network.sh / dev / ttyAMA0 tap0 2001: db8: ffff: ffff :: / 64 921600 We received this error when we ran a similar command. I think we couldn't introduce the 6lowpan slip module on the raspberry. We would like to introduce the slip module via raspberry pi 3 b + and enable ipv6. we have 2 raspberry 802.15.4 modules and 2 6lowpan slip modules. our goal is to run each raspberry pi 6lowpan network we want to establish.

benemorius

July 11, 2019, 5:19 p.m.

Ok that narrows it down but now I don't know which line of the script generates the error. Please can you prepend sh -x to the start_network.sh command to see which command causes the error?

root@ocd:~ # sh -x RIOT/dist/tools/ethos/start_network.sh /dev/ttyAMA0 tap0 2001:db8:ffff:ffff::/64 921600
+ readlink -f RIOT/dist/tools/ethos/start_network.sh
+ dirname RIOT/dist/tools/ethos/start_network.sh
+ ETHOS_DIR=RIOT/dist/tools/ethos
+ PORT=/dev/ttyAMA0
+ TAP=tap0
+ PREFIX=2001:db8:ffff:ffff::/64
+ BAUDRATE=115200
+ readlink -f RIOT/dist/tools/ethos/../uhcpd/bin
+ UHCPD=RIOT/dist/tools/uhcpd/bin/uhcpd
+ [ -z /dev/ttyAMA0 -o -z tap0 -o -z 2001:db8:ffff:ffff::/64 ]
+ [ ! -z 921600 ]
+ BAUDRATE=921600
+ trap cleanup INT QUIT TERM EXIT
+ create_tap
+ ip tuntap add tap0 mode tap user root
+ sysctl -w net.ipv6.conf.tap0.forwarding=1
net.ipv6.conf.tap0.forwarding = 1
+ sysctl -w net.ipv6.conf.tap0.accept_ra=0
net.ipv6.conf.tap0.accept_ra = 0
+ ip link set tap0 address aa:aa:aa:be:ee:ef
+ ip link set tap0 up
+ ip a a fe80::1/64 dev tap0
+ ip a a fd00:dead:beef::1/128 dev lo
+ ip route add 2001:db8:ffff:ffff::/64 via fe80::2 dev tap0
+ start_uhcpd
+ UHCPD_PID=23038
+ RIOT/dist/tools/ethos/ethos tap0 /dev/ttyAMA0 921600
+ RIOT/dist/tools/uhcpd/bin/uhcpd tap0 2001:db8:ffff:ffff::/64
----> ethos: sending hello.
----> ethos: activating serial pass through.

Mesut

July 12, 2019, 1:44 a.m.

The error message is generated by ethos, i've checked the code and this message is generated by checked_write() function int ethos.c

Below is the output you've requested.
----------

root@raspberrypi:~/RIOT# cd ..
root@raspberrypi:~# sh -x RIOT/dist/tools/ethos/start_network.sh /dev/ttyAMA0 tap0 2001:db8:ffff:ffff::/64 921600
+ readlink -f RIOT/dist/tools/ethos/start_network.sh
+ dirname /root/RIOT/dist/tools/ethos/start_network.sh
+ ETHOS_DIR=/root/RIOT/dist/tools/ethos
+ PORT=/dev/ttyAMA0
+ TAP=tap0
+ PREFIX=2001:db8:ffff:ffff::/64
+ BAUDRATE=115200
+ readlink -f /root/RIOT/dist/tools/ethos/../uhcpd/bin
+ UHCPD=/root/RIOT/dist/tools/uhcpd/bin/uhcpd
+ [ -z /dev/ttyAMA0 -o -z tap0 -o -z 2001:db8:ffff:ffff::/64 ]
+ [ ! -z 921600 ]
+ BAUDRATE=921600
+ trap cleanup INT QUIT TERM EXIT
+ create_tap
+ ip tuntap add tap0 mode tap user root
+ sysctl -w net.ipv6.conf.tap0.forwarding=1
net.ipv6.conf.tap0.forwarding = 1
+ sysctl -w net.ipv6.conf.tap0.accept_ra=0
net.ipv6.conf.tap0.accept_ra = 0
+ ip link set tap0 up
+ ip a a fe80::1/64 dev tap0
+ ip a a fd00:dead:beef::1/128 dev lo
+ ip route add 2001:db8:ffff:ffff::/64 via fe80::2 dev tap0
+ start_uhcpd
+ + /root/RIOT/dist/tools/uhcpd/bin/uhcpd tap0 2001:db8:ffff:ffff::/64
UHCPD_PID=1013
+ /root/RIOT/dist/tools/ethos/ethos tap0 /dev/ttyAMA0 921600
----> ethos: sending hello.
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
----> ethos: activating serial pass through.
write to fd 4 failed: Success
write to fd 4 failed: Success
write to fd 4 failed: Success
^C+ cleanup
+ echo Cleaning up...
Cleaning up...
+ remove_tap
+ ip tuntap del tap0 mode tap
+ ip a d fd00:dead:beef::1/128 dev lo
+ kill 1013
+ trap INT QUIT TERM EXIT
root@raspberrypi:~#

benemorius

July 27, 2019, 7:30 p.m.

I'm sorry I have tried very hard to reproduce the error but I have not been able to yet. I found two things to help troubleshoot the problem from your side:

1) Try baudrate 115200 instead of 921600. This requires changing one instance in the start_network.sh command and two instances in the make command. It would be useful to know whether this changes the error.

2) Flash the gnrc_networking example (or most other examples) instead of the gnrc_border_router example, and then use picocom --imap lfcrlf /dev/ttyAMA0 -b 921600 instead of the start_network.sh command. This won't run a border router but it will access a shell on the Riot node running in the kw41z. It would be useful to know whether this also encounters an error or if it works as expected.

Murat

July 28, 2019, 8:54 a.m.

Hi,
Thank you for the answer. We will try and inform you.
thanks.

Murat

July 15, 2019, 12:41 a.m.

Benemorius,
Do you have any comments with the printout sent by Mesut? We're stuck here. :(
thanks.

Mesut

July 16, 2019, 10:25 a.m.

Dude, we've kinda stuck here as Murat points out. Could you please check and get back to us ?

Murat

July 5, 2019, 3:30 a.m.

Hi All,
Pi 6LoWPAN SLIP radio module which kernel also works successfully. How do I install this module in rpi3 ?

benemorius

July 7, 2019, 7:36 a.m.

I have encountered no limitations with linux kernel versions for this one.

1) install master branch of openocd using instructions here.

2) flash gnrc_border_router Riot firmware onto slip module:

apt install gcc-arm-none-eabi gdb-arm-none-eabi
git clone https://github.com/benemorius/RIOT.git
cd RIOT/examples/gnrc_border_router
DEFAULT_CHANNEL=11 ETHOS_BAUDRATE=921600 CFLAGS+="-DSTDIO_UART_BAUDRATE=921600 -DDEBUG_ASSERT_VERBOSE -DKW41ZRF_ENABLE_LEDS=1" USEMODULE+="periph_rtc netstats_l2 netstats_ipv6" BOARD=openlabs-kw41z-slip make -j4 flash
It might be better to use a more recent arm toolchain from here. Also it's faster to compile Riot on something much faster than a Pi if you're going to be reprogramming it often.

3) start ethos script:
RIOT/dist/tools/ethos/start_network.sh /dev/ttyAMA0 tap0 2001:db8:ffff:ffff::/64 921600

Leave a comment